package la.iok.hzsvn.lewin.movie.entity;

import java.util.Objects;

/**
 * 剧本的加密密钥。每个剧本一个加密密钥。剧本每次发布的时候使用密钥加密剧幕视频
 */
public class MovieEncryptCode {
    private Long id;
    /**
     * 剧本id
     */
    private Long movieId;
    /**
     * 加密密钥
     */
    private String key;
    /**
     * 密钥id
     */
    private String keyId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMovieId() {
        return movieId;
    }

    public void setMovieId(Long movieId) {
        this.movieId = movieId;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getKeyId() {
        return keyId;
    }

    public void setKeyId(String keyId) {
        this.keyId = keyId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MovieEncryptCode that = (MovieEncryptCode) o;
        return Objects.equals(id, that.id) && Objects.equals(movieId, that.movieId)
                && Objects.equals(key, that.key) && Objects.equals(keyId, that.keyId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, movieId, key, keyId);
    }
}
